package cn.bupt.adt.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;

public class DateUtil {

	public static Date getTomorrowDate() {
		Calendar calendar = new GregorianCalendar();
		calendar.setTime(new Date());
		calendar.add(Calendar.DATE, 1);
		return calendar.getTime();
	}
	public static String getTomorrowDateString(String pattern) {
		DateFormat df = new SimpleDateFormat(pattern);
		return df.format(getTomorrowDate());
	}
	
	public static String formatDate(String pattern,Date date) {
		DateFormat df = new SimpleDateFormat(pattern);
		return df.format(date);
	}
}
